package win.swt6.spstudyjava.hello;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import win.swt6.spstudyjava.Person;

@Controller
public class HelloController {
    @Autowired
    private Person person;
    @ResponseBody
    @RequestMapping("/hello")
    public String hello(){
        return "hello world!";
    }
    @ResponseBody
    @RequestMapping("/person")
    public String testPerson(){
        return person.toString();
    }
}
